/**
 * @file main.cpp
 * @author Zifeng Huang (Mitcher2022@outlook.com)
 * @brief 两轮差速运动学模型
 * @version 0.1
 * @date 2022-11-05
 * 
 * @copyright Copyright (c) 2022
 * 
 */
#include "main.h"
#include "RoboDevice.h"

void initialize() {
  pros::lcd::initialize();
}

void opcontrol() {
	while (true) {
		int power = RoboDevice::master.get_analog(ANALOG_LEFT_Y);
		int turn = RoboDevice::master.get_analog(ANALOG_RIGHT_X);
		int left = power + turn;
		int right = power - turn;

		RoboDevice::left_mtr_back.move(left);
		RoboDevice::right_mtr_front.move(right);
		RoboDevice::left_mtr_front.move(left);
		RoboDevice::right_mtr_back.move(right);
		pros::lcd::print(0, "Buttons Bitmap: %d\n", pros::lcd::read_buttons());
		pros::delay(20);
	}
}
